package org.msi.bayesiannetwork;

/**
 * <p>Represents a simple variable/node within bayesian network.</p>
 *
 * @author Jakub Narloch
 * @version 1.0
 */
public class Node extends AbstractNode {

    /**
     * <p>Represents the node probability.</p>
     */
    private double probability;

    /**
     * <p>Creates new instance of {@link Node} class with given name, alias and probability.</p>
     *
     * @param name        the node name
     * @param alias       the node alias
     * @param probability the probability
     */
    public Node(String name, String alias, double probability) {
        super(name, alias);

        this.probability = probability;
    }

    /**
     * <p>Retrieves the probability.</p>
     *
     * @return the probability
     */
    public double getProbability() {
        return probability;
    }

    /**
     * <p>Sets the probability.</p>
     *
     * @param probability the probability
     */
    public void setProbability(double probability) {
        this.probability = probability;
    }
}
